home *** CD-ROM | disk | FTP | other *** search
- property pDetailType, pExtension
- global gCurrentText, gCurrentPhoto, gCurrentVideo
-
- on beginSprite me
- set previousItemDelimiter to the itemDelimiter
- set the itemDelimiter to "."
- set pExtension to item 2 of the name of the member of sprite the spriteNum of me
- set the itemDelimiter to previousItemDelimiter
- UpdateDetail(me, pDetailType)
- end
-
- on UpdateDetail me, inputDetailType
- if not (inputDetailType = pDetailType) then
- exit
- end if
- case pDetailType of
- #text:
- set rootName to gCurrentText
- #photo:
- set rootName to gCurrentPhoto
- #video:
- set rootName to gCurrentVideo
- end case
- set memberName to rootName & "." & pExtension
- if not (the number of member memberName = -1) then
- set the member of sprite the spriteNum of me to memberName
- end if
- end
-
- on getPropertyDescriptionList me
- set description to [:]
- addProp(description, #pDetailType, [#default: #text, #format: #symbol, #comment: "Which gCurrent", #range: [#text, #photo, #video]])
- return description
- end
-
- on getBehaviorDescription me
- set endChar to offset("--END OF HEADER", the text of me)
- set endLine to the number of lines in char 1 to endChar of the text of me - 1
- set description to line 1 to endLine of the text of me
- repeat with whichLine = endLine down to 1
- if line whichLine of description = EMPTY then
- delete line whichLine of description
- end if
- end repeat
- delete line 1 of description
- return description
- end
-